package Test;

/**
 * @author feng
 * @Date 2021/12/24 9:27
 * 判断两数组相等
 */
public class Test11 {
    public static void main(String[] args) {
        int[] a = {1, 2, 3, 4, 5};
        int[] b = {1, 2, 3, 4, 5,6};
        boolean b1 = equals(a, b);
        System.out.println(b1);
    }

    public static boolean equals(int[] list1, int[] list2) {
        if (list1.length != list2.length) {
            return false;
        }
        for (int i = 0; i < list1.length; i++) {
            if (list1[i] == list2[i]) {
                return true;
            }
        }
        return false;
    }


}
